package org.dromara.mall.domain.vo;

import org.dromara.mall.domain.TerMallOrder;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;


/**
 * 订单主信息视图对象 ter_mall_order
 *
 * @author xch
 * @date 2025-06-27
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = TerMallOrder.class)
public class TerMallOrderVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @ExcelProperty(value = "")
    private String id;

    /**
     * 订单号
     */
    @ExcelProperty(value = "订单号")
    private String orderNo;

    /**
     * 用户ID
     */
    @ExcelProperty(value = "用户ID")
    private Long userId;



    /**
     * 订单状态(0=待发货,1=已发货,2=已完成,3=已取消)
     */
    @ExcelProperty(value = "订单状态(0=待发货,1=已发货,2=已完成,3=已取消)")
    private Long orderStatus;

    /**
     * 收货人（冗余字段）
     */
    @ExcelProperty(value = "收货人", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "冗=余字段")
    private String consignee;

    /**
     * 收货电话（冗余字段）
     */
    @ExcelProperty(value = "收货电话", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "冗=余字段")
    private String mobile;

    /**
     * 收货地址（冗余字段）
     */
    @ExcelProperty(value = "收货地址", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "冗=余字段")
    private String address;

    /**
     * 自提点ID
     */
    @ExcelProperty(value = "自提点ID")
    private Long pickupPointId;

    /**
     * 自提码
     */
    @ExcelProperty(value = "自提码")
    private String pickupCode;
    @ExcelProperty(value = "预计收入")
    private Integer revenue;
    @ExcelProperty(value = "订单总额")
    private Integer totalPrice;
    @ExcelProperty(value = "支付金额")
    private Integer prepayAmount;
    private String couponId;
    private Integer couponPrice;
    @ExcelProperty(value = "支付方式")
    private String paymentMethod;

    private String pickupPoint;
    private String pickupAddress;
    private Integer isCart;
    private String createTime;
    private String telephone;
    private List<TerMallOrderitemVo> products;
}
